package bma.common.langutil.ai.vm;

public class AIThreadId {

	private final int id;

	public AIThreadId(int id) {
		super();
		this.id = id;
	}

	public int get() {
		return id;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof AIThreadId) {
			AIThreadId o = (AIThreadId) obj;
			return o.id == id;
		}
		if (obj instanceof Number) {
			Number n = (Number) obj;
			return n.intValue() == id;
		}
		return super.equals(obj);
	}

	@Override
	public int hashCode() {
		return new Integer(id).hashCode();
	}

	@Override
	public String toString() {
		return super.toString();
	}
}
